//some searchbox variables
@search-border:#6FB3E0;
@search-color:#666;
@search-color-focus:#656A72;
@search-width:120px;
@sb-search-width:130px;
@search-border-radius:4px;



/* searchbox */
#nav-search {
  position:absolute;
  top:5px; right:22px;
  line-height:24px;

  .form-search {
    margin-top:1px; 
  }
}

#nav-search-input {
 border-color:@search-border;
 border-width:1px;

 width:@search-width;
 height:18px !important;
 border-radius:@search-border-radius !important;
 
 font-size:13px;
 color:@search-color !important;
 z-index:11;


 .transition(~"all ease .15s");

  & + .dropdown-menu { /* the typeahead menu*/
	 min-width:0;
	 left:0; right:0;
  }

  &:focus {
	 color:@search-color-focus;
	 box-shadow:none;
	 .opacity(100);
  }

}

#nav-search-btn {
  border-radius:0;
}

#nav-search-icon {
  color:@search-border;
  font-size:14px;
  line-height:24px;
}




/* nav-search inside sidebar */
#sidebar > #nav-search  {
   position:static;

   background-color:#FAFAFA;
   border-bottom:1px solid #DDD;
   text-align:center;

   height:35px;
   padding-top:5px;


   #nav-search-input {
	 width:@sb-search-width !important;
	 border-radius:0 !important;
	 max-width:@sb-search-width !important;
	 opacity:1 !important;
	 
	 & + .dropdown-menu { text-align:left; }
   }
   
   
   .nav_search_icon_active() {
		border:none;
		border-radius:0;
		padding:0 3px;
	}

	#nav-search-icon {
		.nav_search_icon_active();
	}
   
   /* sidebar when minimized */
   &.menu-min {
	  #nav-search {
	    .form-search {
			position:absolute; left:5px;
			z-index:14;
		}
		
		.nav_search_input_active() {
			width:@sb-search-width !important;
			max-width:@sb-search-width !important;
			.opacity(100) !important;
		}
		#nav-search-input {
			width:0 !important;
			max-width:0 !important;
			.opacity(0) !important;
			
			&:hover, &:focus, &:active {
				.nav_search_input_active();
				 ~ #nav-search-icon {
					.nav_search_icon_active();
				 }
			}
		}
		
		&:hover #nav-search-input {
			.nav_search_input_active();
			~ #nav-search-icon {
				.nav_search_icon_active();
			}
		}
		
		#nav-search-icon {/* inside minimized sidebar */
			border:1px solid;
			border-radius:32px;

			background-color:#FFF;
			padding:0 5px;
		}
	  }
   }

}//nav-search inside sidebar

